<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        html,body{
            height: 100%;
        }
        div.bg{
            height: 100%;
            background-image: url(./梦幻西游图片集/background.jpg);/*此时需要设置父元素的高,否则背景加不上去，因为没有宽高属性，宽度默认占满整个浏览器*/
            animation-name: bg;
            animation-duration: 30s;
            animation-timing-function: linear;
            animation-iteration-count: infinite;
        }
        div.content{
            width: 1000px;
            height: 180px;
            /*此时位于背景的下方，需设置定位属性飘起来*/
            position: absolute;
            left: 200px;
            bottom: 100px;
        }
        div.content li{
            list-style: none;
            width: 200px;
            height: 180px;
            margin-right: 50px;
            float: left;/*为使每一个li一排显示*/
            overflow: hidden;
        }
        div.content li div{
            width: 1600px;
            height: 180px;
            /*超出了父元素大小，需给父元素设置overflow*/
            animation-name: role;
            animation-duration: 1s;
            animation-iteration-count: infinite;
            animation-timing-function: steps(8);
        }
        div.content li div img{
            width: 1600px;
            height: 180px;
        }
        @keyframes role{
            form{
                margin-left: 0px;
            }
            to{
                margin-left: -1600px;
            }
        }
        @keyframes bg{
            from{
                margin-left: -2000px;/*人向前走，背景向后走，若背景从0向正数走，则会出现背景空白*/
            }
            to{
                margin-left: 0px;
            }
        }
    </style>
</head>
<body>
    <div class="bg"></div>
    <div class="content">
        <ul>
            
            <li>
                <div><img src="./梦幻西游图片集/wk.png" alt=""></div><!---li代表每个人，div代表每个人的八哥动作图-->
            </li>
            <li>
                <div><img src="./梦幻西游图片集/bj.png" alt=""></div>
            </li>
            <li>
                <div><img src="./梦幻西游图片集/tc.png" alt=""></div>
            </li>
            <li>
                <div><img src="./梦幻西游图片集/sc.png" alt=""></div>
            </li>
        </ul>
    </div>
</body>
</html>